import req from '@/http/reqdata'
let {reqGetclasssearch}  = req

export default {
    namespaced:true, 
    state:{
        searchdata:{}
    },
    mutations:{
        setsearchdata(state,value){
            state.searchdata = value.data
            // console.log(state.searchdata);
        }
    },
    actions:{
         async reqclasssearch(context,data){
          let newdata=  await reqGetclasssearch(data)
        //   console.log(newdata);
          context.commit('setsearchdata',newdata)
         }
    },
    getters:{
        attrsList(state){
            return state.searchdata.attrsList
        },
        goodsList(state){
            return state.searchdata.goodsList
        },
        trademarkList(state){
            return state.searchdata.trademarkList
        }
    }
}